package com.pool;

import org.apache.commons.pool.PoolableObjectFactory;
import org.apache.commons.pool.impl.GenericObjectPool;

public class GenericObjectPoolTest extends GenericObjectPool<Resource>{
	
	
	public GenericObjectPoolTest(PoolableObjectFactory<Resource> factory, Config config) {
		super(factory, config);
	}

	public static void main(String[] args) {
		/*Config config = new Config();
		config.minIdle = 1;
		config.maxActive = 2;
		GenericObjectPoolTest pool = new GenericObjectPoolTest(new MyResourceFactory(), config);
		Resource resource = null;
		try {
			resource = pool.borrowObject();
			//resource = pool.borrowObject();
			//resource = pool.borrowObject();
			System.out.println("Resource : " + resource);
		} catch (Exception e) {
			System.out.println(e);
		} finally {
			try {
				pool.returnObject(resource);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}*/
		
		System.out.println("s".equals(null));
	}
}
